﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="<?=base_url()?>css/admin-bar.css" type="text/css" rel="stylesheet" />
<link href="<?=base_url()?>css/admin-menu.css" type="text/css" rel="stylesheet" />
<link href="<?=base_url()?>css/admin.css" type="text/css" rel="stylesheet" />
<link href="<?=base_url()?>css/demo_page.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="<?=base_url()?>css/demo_table_jui.css" />
<link href="<?=base_url()?>css/jquery.bubblepopup.v2.3.1.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?=base_url()?>css/smoothness/jquery-ui-1.8.16.custom.css" />
<style>
	span{ font-family:Georgia, "Times New Roman", Times, serif; color:#FF0000; font-size:18px}
	a{ font-family:"Times New Roman", Times, serif; font-size:14px; color:#993333; text-decoration:none;}
	#wp-post-comment{ width:45%; float:left; margin-right:10px;}
	#wp-draft-views{ width:45%; float:left; margin-left:10px; }
	#flot-views{ width:100%; height:200px;}
	.cataName{width:98%; font-size:18px; height:30px; font-family:"Times New Roman", Times, serif; margin: 5px}
	.write{ width:98%; margin:5px;}
	#xoa{ margin-left:30px; margin-right: 150px;}
	#chuyenmuc{ width:98%; margin:5px; font-size:16px; height:30px;}
	.thongbao{color:red; font-size:16px; font-weight:bold}
</style>
<!--[if lte IE 8]><script type="text/javascript" src="<?=base_url()?>js/excanvas.min.js"></script><![endif]-->
<script type="text/javascript" src="<?=base_url()?>js/jquery.min.js"></script>
<script type="text/javascript" src="<?=base_url()?>js/jquery.dataTables.min.js"></script>
<script src="<?=base_url()?>js/jquery.bubblepopup.v2.3.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$('#example').dataTable( {
			"aaSorting":[[0,'asc']],
			"bJQueryUI": true,
			"sPaginationType": "full_numbers",
			"aoColumns": [{"bSearchable": false},
						  {"bSearchable": false, "bSortable": false},
			              null,
						  {"bSortable": false},
						  {"bSortable": false},
						  {"bSortable": false},
			              {"bSearchable": false},
			              null,
						  null,
			              {"bSearchable": false, "bSortable": false}]
		});
		
		$('.editBtn').hover(function(){
			$(this).attr('src','<?=base_url()?>images/edit_hover.png');
		}, function(){
			$(this).attr('src','<?=base_url()?>images/edit.png');
		});
		$('.delBtn').hover(function(){
			$(this).attr('src','<?=base_url()?>images/trash_hover.png');
		}, function(){
			$(this).attr('src','<?=base_url()?>images/trash.png');
		});

		$('.delBtn').click(function(){
			var matk = ($(this).attr('lang'));
			//alert(masp);
			var conf = confirm("Bạn muốn xóa tài khoản?");
			if(conf == true){
				//alert(matk);
				$.post("<?=base_url()?>index.php/qltk_admin_controller/xoataikhoan",{matk:matk},function(data){
					//alert(matk);
					$('#noi_dung').html(data);
					//alert(masp);
					});
			}else{
				return false;
			}
		});
	})
</script>


</head>
<body>
<?=$bar?>
<div id="main-content">
<?=$sidemenu?>
<script type="text/javascript">
	$('#sidemenu #home').addClass('current-top');
</script>
<div id="content">
	<div id="content-head">
    </div>
    <div id="content-body">
		<form name="post_form" action="" method="get">
				<div class="widget-title"><span style="font-style:italic">Chào mừng <b style="color:red"><?=$_SESSION['tenadmin']?></b></span></div>
			<hr>
            <b><h2>Quản lý tài khoản</h2></b>
            <hr />
         	<div id="noi_dung">
			<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
				<thead>
					<tr>
						<th width="8%">Số thứ tự</th>
						<th>Tên đăng nhập</th>
						<th>Họ tên</th>
                        <th>Ngày sinh</th>
						<th>Địa chỉ</th>
                        <th>Email</th>
						<th>Số điện thoại</th>
						<th>Số sản phẩm</th>
                        <th>Số bình luận</th>
						<th>Thao tác</th>
					</tr>
				</thead>
				<tbody>
					<?php
						for($i=0; $i<count($taikhoan); $i++){
							echo"<tr class='gradeU'>";
								echo"<td align='center'>".($i+1)."</td>";
								echo"<td>".$taikhoan[$i]['TenDangNhap']."</td>";
								echo"<td><b>".$taikhoan[$i]['HoTen']."</b></td>";
								echo"<td align='center'>".$taikhoan[$i]['NgaySinh']."</p></td>";
								echo"<td>".$taikhoan[$i]['DiaChi']."</td>";
								echo"<td>".$taikhoan[$i]['Email']."</td>";
								echo"<td>".$taikhoan[$i]['SoDienThoai']."</td>";
								echo"<td class='center' width='100'><a href='#'>".$sosp[$i]."</a></td>";
								echo"<td class='center' width='100'><a href='#'>".$sobl[$i]."</a></td>";
								echo"<td class='center'><a title='Xóa tài khoản' onclick='return show_confirm();'><img lang='".$taikhoan[$i]['MaTaiKhoan']."' class='delBtn' src='".base_url()."images/trash.png' height='32' width='32' ></a></td>";
							echo"</tr>";
						}
					?>
				</tbody>
			</table>
            </div>		
		</form>
    </div>

</div>
</div>
</body>
</html>